package com.zhiyou.text.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhiyou.text.model.UserModel;
import com.zhiyou.text.service.IUserService;

@Controller
@RequestMapping("/admin")
public class UserController {

	@Autowired 
	IUserService userService;

	@RequestMapping("index.do")
	public String index(Model model){
		List<UserModel> list = userService.queryUser();
		
		model.addAttribute("users", list);
		
		return "admin/user";
	}
	
}
